//However, pointers and arrays are not completely interchangeable. For example, consider the following program:However, pointers and arrays are not completely interchangeable. For example, consider the following program:
#include <iostream>
 
using namespace std;
const int MAX = 3;
 
int main ()
{
   int  var[MAX] = {10, 100, 200};
 
   for (int i = 0; i < MAX; i++)
   {
      *var = i;    // This is a correct syntax
      var++;       // This is incorrect. note *(var + 2) = 500; is also correct !
   }
   return 0;
}